package cn.zou.blog.entry;

import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

import org.springframework.format.annotation.DateTimeFormat;

/**
 * 文章bean
 * @author zoujing
 *
 */
public class Article {
	private String id;//文章ID 使用uuid
	private  String title;//文章标题
	private String type;//文章类型
	private String content;//文章内容
	private String create;//文章的创建
	private Date modifyTime;//文章的修改时间
	private String state;//文章的状态
	private String imageUrl;//文章的图片
	private ArrayList<GuestBook> guestbooks=new ArrayList<GuestBook>();
	private long currnt;//浏览次数
	public static String INFO_STATE_PUBLIC = "1";//发布
	public static String INFO_STATE_STOP = "0";//停用
	
	//信息分类
	
	public static String INFO_TYPE_XXTD = "xxtd";
	public static String INFO_TYPE_XXSS = "xxss";
	public static Map<String, String> INFO_TYPE_MAP;
	static {
		INFO_TYPE_MAP = new HashMap<String, String>();
		INFO_TYPE_MAP.put(INFO_TYPE_XXTD, "学习天地");
		INFO_TYPE_MAP.put(INFO_TYPE_XXSS, "新闻时事");
	}
	
	
	

	public Article(String id, String title, String type, String content,
			String create, Date modifyTime, String state, String imageUrl,
			ArrayList<GuestBook> guestbooks, Long currnt) {
		super();
		this.id = id;
		this.title = title;
		this.type = type;
		this.content = content;
		this.create = create;
		this.modifyTime = modifyTime;
		this.state = state;
		this.imageUrl = imageUrl;
		this.guestbooks = guestbooks;
		this.currnt = currnt;
	}

	public Article() {
		super();
	}

	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public String getCreate() {
		return create;
	}
	public void setCreate(String create) {
		this.create = create;
	}
	
	public Date getModifyTime() {
		return modifyTime;
	}

	public void setModifyTime(Date modifyTime) {
		this.modifyTime = modifyTime;
	}

	public String getState() {
		return state;
	}
	public void setState(String state) {
		this.state = state;
	}

	public String getImageUrl() {
		return imageUrl;
	}

	public void setImageUrl(String imageUrl) {
		this.imageUrl = imageUrl;
	}

	public ArrayList<GuestBook> getGuestbooks() {
		return guestbooks;
	}

	public void setGuestbooks(ArrayList<GuestBook> guestbooks) {
		this.guestbooks = guestbooks;
	}

	public Long getCurrnt() {
		return currnt;
	}

	public void setCurrnt(Long currnt) {
		this.currnt = currnt;
	}
	

}
